package org.xi.structural.decorator;

import org.xi.structural.decorator.api.Circle;
import org.xi.structural.decorator.api.Rectangle;
import org.xi.structural.decorator.decorator.RedShapeDecorator;
import org.xi.structural.decorator.decorator.ShapeDecorator;

/**
 * 装饰器模式
 */
public class Main {

    public static void main(String[] args) {

        ShapeDecorator redCircle = new RedShapeDecorator(new Circle());
        ShapeDecorator redRectangle = new RedShapeDecorator(new Rectangle());

        redCircle.draw();
        redRectangle.draw();
    }
}
